package com.ruoyi.project.zerocarbon.mapper;

import com.ruoyi.project.zerocarbon.domain.Declaration;
import com.ruoyi.project.zerocarbon.domain.vo.DeclarationAuditVo;
import com.ruoyi.project.zerocarbon.domain.vo.DeclarationVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 【请填写功能名称】Mapper接口
 * 
 * @author ruoyi
 * @date 2021-07-10
 */
public interface DeclarationMapper 
{
    /**
     * 查询【请填写功能名称】
     * 
     * @param id 【请填写功能名称】ID
     * @return 【请填写功能名称】
     */
    public Declaration selectDeclarationById(Long id);
    public Declaration selectDeclarationByQiniuId(String persistentId);

    /**
     * 新增【请填写功能名称】
     * 
     * @param declaration 【请填写功能名称】
     * @return 结果
     */
    public int insertDeclaration(Declaration declaration);

    /**
     * 修改【请填写功能名称】
     * 
     * @param declaration 【请填写功能名称】
     * @return 结果
     */
    public int updateDeclaration(Declaration declaration);

    /**
     * 删除【请填写功能名称】
     * 
     * @param id 【请填写功能名称】ID
     * @return 结果
     */
    public int deleteDeclarationById(Long id);

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteDeclarationByIds(Long[] ids);

    public Declaration selectByAccountAndType(@Param("account") String account,@Param("managementType")Integer managementType);

    public List<Declaration> selectDeclarationList(DeclarationVo declarationVo);

    Integer countByRegion(@Param("province") String province, @Param("managementType")Integer managementType);

    Integer countByManagementType(@Param("managementType")Integer managementType);

    Integer countReporterByManagementTypeAndStatus(@Param("managementType")Integer managementType,@Param("province") String province);

    public List<DeclarationAuditVo> getRegionCheckStatus();
    public Integer getRegionCheckStatusByProvince(@Param("managementType")Integer managementType,@Param("province") String province);

    public List<Declaration> getRankingDecorationList(DeclarationVo declarationVo);
    public List<Declaration> getGroupDecorationList(DeclarationVo declarationVo);
    public List<Declaration> getGroupDecorationListAndNoJudgeStatus(DeclarationVo declarationVo);
    public List<Declaration> getGroupDecorationListAndJudgeStatus(DeclarationVo declarationVo);
//    public List<Declaration> getJudgeDecorationList(DeclarationVo declarationVo);

    public int getRankingNum(@Param("score") Integer score,@Param("managementType")Integer managementType);
}
